Hidden Technical Debt in Machine Learning Systems
Analyzes hidden technical debt that inflates ML maintenance costs and proposes strategies for managing system-level anti-patterns and data dependencies.
This research analyzes why ML systems generate more technical debt than traditional software. It identifies boundary erosion and data dependency issues at the system level as the primary root causes.
Introduction
Many enterprises are captivated by the benchmark performance of AI models and rapidly build prototypes, only to face unexpectedly massive costs when maintaining these systems in production. This is not merely a matter of engineering proficiency, but a result of the inherent nature of ‘technical debt’ within machine learning systems.
Traditional software can limit the scope of changes through strict encapsulation and modularization. However, because external variables—specifically data—determine the behavior of ML systems, complexities arise that cannot be controlled by code-level abstraction alone. It is frequent for a single data change to alter the weights and behavior of the entire system.
This phenomenon eventually leads to the bloating of ‘glue code’ and increased pipeline complexity, exponentially raising the cost of adding new features or improving existing models over time. Behind many projects trapped in ‘PoC purgatory’ lies this systemic debt.
In this analysis, using the ML system technical debt framework proposed by Google researchers, we examine why AI projects become rigid after deployment and what design principles must be upheld from an engineering perspective to prevent this.
Core Thesis
This paper analyzes the phenomenon where the construction cost of machine learning (ML) systems is low, but maintenance costs increase exponentially, using the software engineering concept of Technical Debt. The authors argue that ML systems possess both traditional code maintenance issues and ML-specific risk factors where data influences system behavior.
The researchers define key risk factors to consider during system design as Boundary Erosion, Entanglement, Hidden Feedback Loops, Undeclared Consumers, and unstable data dependencies. In particular, according to the researchers’ analysis (Figure 1 of the source paper), the proportion of ML code responsible for training and prediction in actual ML systems is extremely small; the majority consists of supporting infrastructure and ‘Glue Code.’
Furthermore, the paper details system design anti-patterns such as ‘Pipeline Jungles’ arising from data preparation, the accumulation of experimental codepaths, and debt caused by a lack of abstraction. It addresses the invalidation of fixed thresholds due to changes in the external world and proposes the necessity of monitoring metrics (e.g., prediction bias) to resolve this.
In conclusion, the authors emphasize that a cultural shift toward reducing system complexity and ensuring reproducibility, rather than simply improving accuracy, is an essential requirement for successful ML teams.
Executive Key Takeaways
- 1 1. [Root Cause of Systemic Debt] ML systems generate unique technical debt, including boundary erosion due to data dependencies and mutual entanglement based on the CACE (Changing Anything Changes Everything) principle, in addition to traditional code debt.
- 2 2. [Operational Design Implications] Enterprise ML leaders should prioritize reducing glue code proportions, visualizing data dependencies, and building automated monitoring systems over simple model performance metrics.
- 3 3. [Organizational Challenge] How to quantitatively measure and manage the optimal balance between short-term gains in accuracy and the long-term cost of increased system complexity?
Why do ML maintenance costs rise more steeply than in traditional software?
First, ML systems experience strong Entanglement between components according to the ‘CACE (Changing Anything Changes Everything)’ principle. Traditional software minimizes the impact of a change in one area by strictly separating interfaces between modules; however, within an ML model, if the distribution of a single feature changes, the weights and importance of all other features change accordingly. This interdependence creates an ‘improvement deadlock’ where enhancing individual components can actually degrade overall system performance. This is difficult to resolve without strategies such as isolating models into ensembles or precisely detecting changes in prediction behavior at the slice level.
Second, data dependencies create debt that is far harder to detect and more dangerous than code dependencies. Unlike code dependencies, which can be statically analyzed via compilers or linkers, data dependencies occur dynamically at runtime and remain hidden throughout the system. In cases of ‘unstable data dependencies’—where signals generated by other systems are used as inputs—minor improvements or modifications in an upstream system frequently result in catastrophic errors for the downstream ML model. Furthermore, when ‘legacy features’ added during early development or highly correlated ‘redundant features’ are not removed, the system becomes excessively vulnerable to unnecessary external changes.
Third, system anti-patterns represented by ‘Glue Code’ and ‘Pipeline Jungles’ hinder the pace of innovation. Many ML projects adopt general-purpose packages as black boxes, resulting in the writing of vast amounts of support code to align data with the package specifications. According to the researchers’ analysis (Figure 1 of the source paper), ML code in mature systems often accounts for less than 5% of the total, with the remainder filled by glue code. This structure binds the system to the specific characteristics of a package, increasing replacement costs, while pipeline jungles—where data preprocessing steps are organically entangled—create a high-cost structure where even minor bug fixes require full-system integration testing.
ML researchers and engineers tend to choose options that significantly increase system complexity for very marginal gains in accuracy. However, the addition of such ‘epsilon-features’ or complex model chaining becomes high-interest technical debt that causes maintenance costs to explode in the long run.
Specifically, when ‘Undeclared Consumers’ exist—where the output of a model is used as input for another system—attempts to improve model performance can unintentionally cause other systems to collapse. This is a typical example of how dangerous system-level visibility debt can be.
Five ML System Anti-patterns and Structural Risks
The most frequent design flaw during the implementation of ML systems is the bloating of Glue Code resulting from the adoption of general-purpose packages as black boxes. When general solutions or open-source packages developed by ML researchers are used as-is, vast amounts of support code must be written to fit the data into the package specifications. Such glue code anchors the system to the characteristics of a specific package, hindering domain-specific optimization and astronomically increasing the cost of replacing the package in the future.
This glue code appears in a more complex form during data preparation, defined as Pipeline Jungles. In this structure, scraping, joining, and sampling steps become organically entangled every time a new signal is added, leading to the indiscriminate creation of intermediate files. Pipelines built this way make error detection and recovery extremely difficult, and even minor modifications force high-cost end-to-end integration tests of the entire system. The researchers emphasize that a comprehensive investment in redesigning the data collection and feature extraction processes is the only way to lower long-term maintenance costs.
Risks arising from the accumulation of temporary measures implemented for operational efficiency are also severe. A prime example is Dead Experimental Codepaths implemented as conditional branches within the main production code. These paths, added to experiment quickly without modifying the entire infrastructure, exponentially increase cyclomatic complexity over time. This makes maintaining backward compatibility and testing impossible. The paper warns of the danger using the case of Knight Capital, where an old experimental path caused unexpected behavior, resulting in a loss of $465 million in just 45 minutes.
A more fundamental problem is Abstraction Debt caused by the lack of strong abstractions to support ML systems. Unlike relational databases, which provided a standard abstraction for data management, the ML field lacks universal interfaces for defining data streams, models, and predictions. This blurs the boundaries between components and leads to a reliance on inappropriate abstractions, such as Map-Reduce, even in distributed learning environments. The absence of these standards increases the coupling between components, creating a structural vulnerability where small changes propagate through the entire system.
Finally, Common Smells detected at the code level serve as indicators of potential system collapse. The ‘Plain-Old-Data Type Smell’ is representative, where information-rich ML data is handled using only basic data types like floats or integers. Additionally, the ‘Multiple-Language Smell,’ which mixes several languages for library convenience, increases testing costs and complicates ownership transfers. Particularly, the ‘Prototype Smell,’ arising from excessive reliance on prototyping environments, carries the risk that results from small-scale environments are not reproducible at production scale, creating a dangerous path where prototypes harden into production solutions under pressure.
Data Dependency Types and Management Strategies
In ML systems, Data Dependencies are far harder to detect than code dependencies in traditional software engineering, and they create equally fatal technical debt. Beyond the limits of static analysis noted above, explicit tracking tools are often lacking, so if complex data dependency chains form within a system, the cost of decoupling or modifying them later increases exponentially.
The researchers categorize this data debt into two main types. First, Unstable Data Dependencies occur when the qualitative or quantitative characteristics of an input signal change over time. This includes cases where the output of another ML model is used as input or when data-dependent lookup tables, such as TF-IDF scores, are used. The risk increases significantly when the team generating the input signal and the model team consuming it are separate. A ‘performance improvement’ or ‘calibration’ performed by an upstream system may be perceived by the downstream model as a data distribution different from what it was trained on, leading to a sudden drop in prediction performance or system collapse.
Conversely, Underutilized Data Dependencies refer to input signals that remain in the system despite contributing almost nothing to the model’s predictive performance. These make the system unnecessarily vulnerable and act as potential time bombs that trigger fatal failures if the data supply is ever interrupted. The researchers suggest four primary causes for this debt: first, Legacy Features introduced during early development that were replaced by new features but not removed; second, Bundled Features added as a group without individual validation due to deadline pressure; third, -Features added at the expense of complexity for negligible accuracy gains; and finally, Correlated Features that lack actual causality, making the system vulnerable when world correlations change.
The first strategy for managing this data dependency debt is the introduction of Versioning. To control unstable data dependencies, instead of immediately reflecting upstream changes, copies of signals are created to freeze versions. By maintaining specific mapping tables or semantic maps at a fixed version and replacing them only after the stability of a new version is sufficiently verified, unexpected chain reactions can be prevented. However, this involves a tradeoff, as it can hinder data freshness and increase management costs for maintaining multiple concurrent versions.
A more fundamental solution is building static analysis tools for data dependencies. The researchers emphasize the need for an Automated Feature Management System that manages data sources and features using annotations. This allows for the complete resolution of the data dependency tree, ensuring migration safety by identifying consumer models affected when a specific data source is changed or deleted.
Lastly, to remove underutilized data dependencies, they recommend regularly performing a ‘Leave-one-feature-out’ exhaustive audit. This provides a practical way to reduce system complexity by quantitatively measuring the influence of unnecessary features on the model and aggressively deleting them. Ultimately, data dependency management is a core engineering activity that goes beyond simple optimization to ensure overall system visibility and increase resilience to external changes.
Feedback Loops: The Mechanism of Analysis Debt
One of the most dangerous characteristics of an operational ML system is the formation of Feedback Loops, where the system influences its own behavior over time. This structure makes it extremely difficult to predict how a model will operate in a real environment prior to deployment, a phenomenon the researchers define as Analysis Debt. Because analysis debt stems from dynamic system interactions rather than code defects, it is nearly impossible to detect using traditional software testing methods.
Feedback loops are categorized into two types. First, Direct Feedback Loops occur when a model is directly involved in the process of selecting its own future training data. While many companies use standard supervised learning algorithms, Contextual Bandit algorithms are theoretically more appropriate. However, bandit algorithms are difficult to scale to the massive Action Spaces required in real business environments. To mitigate this, strategies such as introducing randomization to some data or isolating specific data outside the model’s sphere of influence are necessary.
More fatal are Hidden Feedback Loops. This refers to the phenomenon where two or more systems indirectly influence each other through the external world. For example, assume a product recommendation system and a related review selection system operate independently on a webpage. Improving the product recommendation model changes user click patterns, which consequently alters the input data distribution for the review selection model, triggering unexpected behavior. Such interactions can occur even between completely separate systems. The paper warns of the risk where improvements or bugs in one model distort the behavior of others, citing cases where stock market prediction models from different investment firms influence each other’s buy and sell actions.
The danger of these feedback loops lies in the fact that their impact appears very gradually. If the model update cycle is long, the change in data distribution progresses slowly, meaning that by the time an operator notices the problem, the entire system may already be severely distorted. Consequently, in systems where analysis debt has accumulated, the results of modifying a specific variable are non-linear, and model performance improvements may paradoxically increase overall system instability.
Ultimately, analysis debt suggests that ML models should be viewed not as simple mathematical functions, but as organic systems that constantly interact with their external environment. This is the root cause of the discrepancy between offline validation metrics before launch and actual performance after deployment. To resolve this, it is essential to adopt a design perspective that analyzes the dependency relationships between systems and the closed loops of data flow, rather than becoming obsessed with single-model metrics.
External World Changes and Dynamic Threshold Management
One of the most challenging tasks ML systems face is that the external world they interact with is never static. Continuous environmental changes inevitably generate maintenance costs and cause serious technical debt, particularly in the management of Thresholds used for decision-making. Many systems manually set thresholds based on validation data at a specific point in time to find the optimal balance between Precision and Recall. However, when a model is updated with new data, these fixed thresholds are no longer valid; manually correcting each one creates a fragile structure that severely degrades operational efficiency.
To overcome the risks of fixed thresholds, the researchers propose an automated method that learns the threshold itself using separate validation data. This approach minimizes risks and costs associated with manual intervention by allowing the system to autonomously update the optimal decision criteria, even as the model’s output distribution shifts due to environmental changes.
Furthermore, to detect dynamic changes in the external world, a real-time monitoring system that goes beyond simple unit or integration tests is essential. The researchers propose Prediction Bias as a key metric for judging system health. Prediction bias is the discrepancy between the distribution of labels predicted by the model and the distribution of labels actually observed. If these two distributions do not align, it serves as a strong diagnostic signal that the model’s distribution, trained on past data, no longer reflects current reality—indicating a sharp change in the external world.
Specifically, introducing Slicing techniques to analyze this prediction bias across various dimensions allows for the rapid isolation and detection of localized problems in specific segments, rather than just overall system performance degradation. By combining this with an automated alerting system, operators can establish a foundation for preemptively responding to anomalies.
Additionally, for systems that perform physical actions in a real environment, it is critical to set safety mechanisms called Action Limits. This involves pre-defining broad upper and lower bounds for actions, such as setting bid prices or classifying spam emails based on predicted results. If a model error or sudden external change causes the system to attempt an action outside these limits, the system immediately triggers an automated alert and prompts human expert intervention, serving as a guardrail to prevent catastrophic accidents.
Finally, strict management of Up-stream Producers flowing into the ML system must be maintained. Errors or changes in upstream data supply processes have an immediate impact on downstream ML model performance. Therefore, upstream systems must adhere to Service Level Objectives (SLOs), and related alerts must be structured to propagate immediately to the ML system’s Control Plane. Pointing out the limitations of response methods relying solely on human intervention, the researchers emphasize that building automated response systems that operate without direct intervention to handle real-time external changes is a valuable investment for long-term system reliability.
Methods for Measuring Technical Debt
Since Technical Debt is a metaphorical concept, calculating it as a quantitative metric or tracking it over time is extremely difficult. Many teams mistakenly believe their debt level is low simply because the system is currently operating quickly; this is a dangerous judgment. The true cost of technical debt only becomes visible when the system becomes so rigid that innovation is no longer possible. Therefore, instead of quantitative figures, the researchers suggest evaluating the debt level through five key questions that diagnose system flexibility and maintainability.
The first diagnostic criterion is the replaceability of algorithms. One must ask how easily a completely new algorithmic approach can be tested at full scale. If adopting a new model requires redesigning the entire data pipeline or modifying numerous pieces of glue code, the system carries severe debt. This indicates that the system is strongly coupled to the characteristics of a specific algorithm or package, which significantly slows the pace of adopting future technical advances.
Second is the establishment of visibility for data dependencies. It is necessary to review whether the transitive closure of all data dependencies is clearly understood. When a specific input signal changes, it should be possible to track all links from the primary model consuming that signal to the downstream systems that use that model’s output as their own input. Modifications made without such a dependency map cause unpredictable chain errors, acting as potential debt that undermines system stability.
Third, the precision of impact measurement following system changes must be evaluated. This is the process of verifying how accurately the impact is measured when new changes are applied. If it is impossible to clearly distinguish whether a change in performance metrics is due to model improvement or an unintended change in data distribution or interaction with other components, the system is in a state of accumulated Analysis Debt.
Fourth is the interference between components, specifically the conflict between models. One must verify whether improving a specific model or signal degrades the performance of other models. This directly relates to the aforementioned Entanglement phenomenon. If the optimization of individual elements does not lead to overall system optimization but instead negatively impacts other parts, it means the system is in an ‘improvement deadlock,’ which exponentially increases maintenance costs.
Finally, the efficiency of human resource onboarding must be examined. This involves measuring how much time it takes for a new member joining the team to understand the system structure and be deployed to actual work. The lack of system abstraction and the presence of complex pipeline jungles increase the time required for new personnel to grasp the system. This is evidence of a high reliance on undocumented tacit knowledge and becomes a massive operational cost for the organization.
Ultimately, managing technical debt in ML systems is not simple code cleanup, but the process of creating a structure where one can answer ‘yes’ to these questions. Decisions to excessively increase system complexity for minor accuracy gains become fatal debt in the long run. Therefore, it is essential for both researchers and engineers to be wary of such systemic rigidity and undergo a cultural shift that prioritizes maintainability as much as functional implementation.
Engineering Checklist for ML System Technical Debt Diagnosis
- Glue Code Proportion: Is the ratio of pure ML logic to support code for data I/O appropriate within the entire codebase?
- CACE Impact Assessment: Can the impact of a single feature change on the overall model weights and prediction results be quantitatively measured?
- Data Dependency Visualization: Are the origins, ownership, and versioning systems of all input signals used by the model clearly defined?
- Undeclared Consumer Search: Are model predictions being consumed by external systems without authorization via logs or files?
- Pipeline Integrity: Is the data preprocessing process composed of modular pipelines rather than a sequence of complex joins and sampling (a jungle)?
- Experimental Path Cleanup: Are past experimental codepaths (Dead Codepaths) branched via conditionals within production code periodically removed?
- Configuration Management: Are model configurations included in code reviews, and can differences between versions be easily compared visually?
- Prediction Bias Monitoring: Is there a system to detect the discrepancy between the training data distribution and the predicted label distribution of actual serving data in real-time?
Technical Debt Management Strategy for Enterprise AI Leaders
The core insight of this paper is that the failure of ML projects stems not from a lack of algorithmic performance, but from ‘systemic rigidity.’ Many executives demand only a single metric—‘Accuracy’—from AI teams, but this paradoxically drives engineers to increase system complexity just to raise the numbers. Leaders must now simultaneously manage two key metrics: ‘Model Performance’ and ‘System Maintainability.’
The bloating of ‘glue code’ specifically stems from the disconnect between research and engineering organizations. In a structure where engineers are forced to fit a black-box model created by a researcher into a system, technical debt is inevitable. To resolve this, it is urgent to adopt a ‘Hybrid Research-Engineering Model’ where researchers and engineers collaborate in the same team and consider operational viability from the design stage.
Furthermore, monitoring systems responding to data drift or concept drift must move beyond simply providing ‘alerts’ to being linked to Automated Response systems. Changes in the external world happen in real-time; a method where humans intervene to modify thresholds cannot sustain modern large-scale ML systems.
Ultimately, the success of an ML system depends not on how sophisticated the model is, but on how ‘easy to delete’ the system is. Organizational rewards should be given for activities that aggressively remove unnecessary features, simplify complex pipelines, and raise the level of abstraction.
Five Design Principles for Sustainable ML System Operations
To minimize technical debt in ML systems and ensure long-term operational efficiency, the following principles must be observed:
- Maintain Abstraction Boundaries: Do not treat ML packages as black boxes; wrap them in common APIs to remove system dependencies on specific libraries.
- Data Versioning: To resolve unstable data dependencies, create frozen versions of input signals and update them only after verification.
- Feature Minimization Principle: Forcibly remove redundant and legacy features that do not contribute to model performance through regular ‘Leave-one-feature-out’ evaluations.
- Config-as-Code: Manage all hyperparameters and data settings in the code repository and reflect them only after a strict code review process.
- Real-time Bias Detection: Immediately detect changes in the external world through Prediction Bias monitoring, which compares the distribution of predicted labels with actual observed values.
Further reading
- An Empirical Study on Self-Admitted Technical Debt in AI Agents
- Understanding Self-Admitted Technical Debt in Test Code: An Empirical Study
- Technical Debt Governance for Agentic AI Systems
References and Original Analysis Materials
Hidden Technical Debt in Machine Learning Systems
Authors: D. Sculley, Gary Holt, Daniel Golovin, Eugene Davydov, Todd Phillips, Dietmar Ebner, Vinay Chaudhary, Michael Young, Jean-François Crespo, Dan Dennison
Venue / Publisher: proceedings.neurips.cc
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.
Read more
Opinions & Columns ·
Prerequisites for AX Success: Moving Beyond Patchwork to Process Modernization

Tech & MLOps ·
ADAZOR: Hypothesis Testing for Concept Drift Detection in Machine Learning
Tech & MLOps ·
Trust Must Survive Deployment: The Continuous Assurance Lifecycle for Adaptive AI Systems

Tech & MLOps ·
AI Safety and Security Technical Debt in AI-Enabled System Engineering