What You Will Learn from This Article
A well-known paper argues that machine learning systems, while quick to build, easily accumulate “debt” that takes significant effort to fix later. I mapped the types of debt identified in that paper to three small systems in this repository to manually verify where the debt had piled up.
The Paper I Read
The Question Posed by the Paper
The concept of “technical debt” in software posits that cutting corners during hasty development becomes interest when making repairs later. The paper pointed out that machine learning systems incur debt not found in ordinary software. It argues that model code makes up only a tiny fraction of the overall system, and debt accumulates in the surrounding data flows, configurations, and monitoring.
The Paper’s Concepts
Here is a simplified explanation of the main forms of debt cited in the paper.
-
Entanglement: Changing a single feature alters how other features behave as well as the overall prediction. “Changing one thing changes everything.”
-
Hidden Consumers: Other systems use the prediction results without the creator’s knowledge.
-
Data Dependencies That Cost More Than Code (Unstable Data Dependencies): The format or meaning of input data changes due to circumstances on other teams.
-
Hidden Feedback Loops: People alter their behavior after seeing predictions, which in turn alters the next training dataset.
-
Glue Code and Pipeline Jungles: Code connecting components and branching paths in preprocessing proliferate excessively.
-
Dead Experimental Codepaths: Branches added experimentally remain behind and execute without anyone noticing.
-
Configuration Debt: Thresholds and parameters are scattered all over the codebase.
-
Changes in the External World: Fixed thresholds become obsolete. Without monitoring, these changes go unnoticed.
In addition, the paper cites the inability to reproduce results (reproducibility debt) as another form of debt.
Testing on Local Projects
I applied the nine types above to three systems in this repository. Evaluations were made using four categories—”Addressed,” “Partial,” “Unaddressed,” and “Not Applicable”—with the reasoning written one line at a time in data/debts.csv.
-
View Count Prediction Model: An app that predicts view counts for one’s own YouTube videos using pre-publication information ([youtube-views-predictor](https://github.com/takayuki-0127/youtube-views-predictor)). Added monitoring and retraining mechanisms in November.
-
dbt mart: A monthly reporting definition for a fictional retailer written only once in a dbt and DuckDB mart (projects/dbt_retail_mart)
-
Weekly reproducibility check: A mechanism that reruns the code from article 551 onward every week using GitHub Actions to verify whether the results match (tools/repro_check.py)

Findings
1. Technical debt had accumulated broadly across the predictive model. Out of the 9 types, only 1 was “addressed” (code for unused experiments), 7 were “partially addressed,” and 1 was “unaddressed” (it breaks if the format of the input CSV changes).
2. The dbt mart was structured to reduce technical debt in advance. 7 out of the 9 types were “addressed.” Approaches like writing definitions in one place, separating into layers, and adding schema tests directly helped mitigate much of the debt mentioned in the paper. However, because there is no mechanism for receiving production data, changes in the outside world are not monitored.
3. The reproducibility check is resilient against “changes in the outside world,” but its users are undefined. Since it runs automatically every week and treats discrepancies as failures, you can immediately tell if results change due to library updates. On the other hand, it has not been decided who will look at the results and how to fix them.
Paper Limitations and Pitfalls Discovered Through Experimentation
-
The paper assumes large systems at large companies. In small systems, issues like “hidden consumers” and “entanglement” are still minor, which tends to make assessments overly lenient (speculation).
-
The assessment was scored manually by the person who built it, so it would change if reviewed by someone else.
-
I believe “hidden feedback loops” in predictive models are particularly prone to occurring on one’s own channel. This is because altering how videos are produced after looking at predictions directly influences subsequent training data (speculation).
Practical Application for Work
-
Use these 9 types as a checklist when building new systems. In particular, “verifying input schemas” and “centralizing configuration in one place” require relatively little effort even if implemented from the very beginning.
-
Document a list of people and systems using the predictions (exposures in dbt).
-
Do not stop monitoring at merely “having built it”; actually run it and keep records. The scoring method was tested in P09.
Related Papers and Next Reads
-
Breck et al. (2017), “The ML Test Score”: A 28-item pre-production checklist by the same authors. Scored in P09.
-
Sculley et al. (2014), “Machine Learning: The High-Interest Credit Card of Technical Debt”: An earlier version of this paper.
Terminology Notes
-
Technical debt: The concept that shortcuts taken during rushed development return later as the effort (interest) required to fix them.
-
exposure: A mechanism in dbt used to document “who is using this data and for what purpose.”
-
Threshold: A boundary value indicating “trigger a signal once this value is exceeded.”
-
Reproduction: Producing the same results using the same code and data.
-
Mart: A data repository organized according to intended use.
Limitations / What Cannot Be Claimed
-
This does not validate the paper’s claims; it merely applies the types of debt to small systems as a checklist.
-
Because the three systems differ in purpose and scale, this is not a comparison to determine which one is superior.
All data, code, and figures are available on GitHub: https://github.com/takayuki-0127/japan-open-data-notes/tree/main/papers/P08_ml_technical_debt
Leave a comment