# Analysing Python Machine Learning Notebooks with Moose

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

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 11 of its 26 references that are in the map.
- First posted on arXiv 15 Sep 2025.

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

- [Code Smells and Refactoring: A Tertiary Systematic Review of Challenges and Observations](https://mlsanity.com/paper/2004.10777/) (2020)
- [The Prevalence of Code Smells in Machine Learning projects](https://mlsanity.com/paper/2103.04146/) (2021)
- [Better Code, Better Sharing:On the Need of Analyzing Jupyter Notebooks](https://mlsanity.com/paper/1906.05234/) (2019)
- [KGTorrent: A Dataset of Python Jupyter Notebooks from Kaggle](https://mlsanity.com/paper/2103.10558/) (2021)
- [Design Smells in Deep Learning Programs: An Empirical Study](https://mlsanity.com/paper/2107.02279/) (2021)
- [A large-scale comparative analysis of Coding Standard conformance in Open-Source Data Science projects](https://mlsanity.com/paper/2007.08978/) (2020)
- [Code Smells for Machine Learning Applications](https://mlsanity.com/paper/2203.13746/) (2022)
- [Code Duplication and Reuse in Jupyter Notebooks](https://mlsanity.com/paper/2005.13709/) (2020)
- [A Static Analysis Framework for Data Science Notebooks](https://mlsanity.com/paper/2110.08339/) (2021)
- [Eliciting Best Practices for Collaboration with Computational Notebooks](https://mlsanity.com/paper/2202.07233/) (2022)
- [Pynblint: a Static Analyzer for Python Jupyter Notebooks](https://mlsanity.com/paper/2205.11934/) (2022)

## Abstract (arXiv)

Machine Learning (ML) code, particularly within notebooks, often exhibits lower quality compared to traditional software. Bad practices arise at three distinct levels: general Python coding conventions, the organizational structure of the notebook itself, and ML-specific aspects such as reproducibility and correct API usage. However, existing analysis tools typically focus on only one of these levels and struggle to capture ML-specific semantics, limiting their ability to detect issues. This paper introduces Vespucci Linter, a static analysis tool with multi-level capabilities, built on Moose and designed to address this challenge. Leveraging a metamodeling approach that unifies the notebook's structural elements with Python code entities, our linter enables a more contextualized analysis to identify issues across all three levels. We implemented 22 linting rules derived from the literature and applied our tool to a corpus of 5,000 notebooks from the Kaggle platform. The results reveal violations at all levels, validating the relevance of our multi-level approach and demonstrating Vespucci Linter's potential to improve the quality and reliability of ML development in notebook environments.
