# Data-aware Static Analysis: Improving Detection of Semantic Faults in Machine Learning Code Using Data Characteristics

arXiv: https://arxiv.org/abs/2606.09957 · HTML: https://mlsanity.com/paper/2606.09957/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 12 of its 30 references that are in the map.
- First posted on arXiv 8 Jun 2026.

## Builds on (most cited first, 12 of 12)

- [Data Collection and Quality Challenges in Deep Learning: A Data-Centric AI Perspective](https://mlsanity.com/paper/2112.06409/) (2021)
- [Taxonomy of Real Faults in Deep Learning Systems](https://mlsanity.com/paper/1910.11015/) (2019)
- [Characterizing Technical Debt and Antipatterns in AI-Based Systems: A Systematic Mapping Study](https://mlsanity.com/paper/2103.09783/) (2021)
- [Better Code, Better Sharing:On the Need of Analyzing Jupyter Notebooks](https://mlsanity.com/paper/1906.05234/) (2019)
- [Bug Characterization in Machine Learning-based Systems](https://mlsanity.com/paper/2307.14512/) (2023)
- [Quality issues in Machine Learning Software Systems](https://mlsanity.com/paper/2208.08982/) (2022)
- [Bug Analysis in Jupyter Notebook Projects: An Empirical Study](https://mlsanity.com/paper/2210.06893/) (2022)
- [Maintainability Challenges in ML: A Systematic Literature Review](https://mlsanity.com/paper/2408.09196/) (2024)
- [Why do Machine Learning Notebooks Crash? An Empirical Study on Public Python Jupyter Notebooks](https://mlsanity.com/paper/2411.16795/) (2024)
- [Safe-DS: A Domain Specific Language to Make Data Science Safe](https://mlsanity.com/paper/2302.14548/) (2023)
- [What Kinds of Contracts Do ML APIs Need?](https://mlsanity.com/paper/2307.14465/) (2023)
- [MLScent A tool for Anti-pattern detection in ML projects](https://mlsanity.com/paper/2502.18466/) (2025)

## Abstract (arXiv)

Semantic faults specific to the use of machine learning models are a common problem for machine learning developers, causing suboptimal predictions, high computational cost, or incorrect outputs. For example, one may erroneously use unscaled data to train a scale-sensitive model. Machine learning developers detect these faults after training their models and manually analyzing the results, making it an inefficient process. We propose a novel data-aware static analysis approach to detect semantic faults in machine learning code, allowing developers to reveal these bugs while writing code instead of after training the model. Our approach uses combined data and control flow analysis, and API contracts, enabling data-aware reasoning about machine learning code at a high level of abstraction. We highlight the potential of our solution by analyzing a sample of real-world machine learning notebooks, finding that we can detect faults that require a data-aware approach.
