# A Static Analysis Framework for Data Science Notebooks

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

## Key facts

- Cited by 4 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 15 Oct 2021.

## Built on by (most cited first, 4 of 4)

- [Contextualized Data-Wrangling Code Generation in Computational Notebooks](https://mlsanity.com/paper/2409.13551/) (2024)
- [A Data Source Dependency Analysis Framework for Large Scale Data Science Projects](https://mlsanity.com/paper/2212.07951/) (2022)
- [Analysing Python Machine Learning Notebooks with Moose](https://mlsanity.com/paper/2509.11748/) (2025)
- [JupOtter: Cell-Level Bug Detection in Jupyter Notebooks](https://mlsanity.com/paper/2606.23877/) (2026)

## Abstract (arXiv)

Notebooks provide an interactive environment for programmers to develop code, analyse data and inject interleaved visualizations in a single environment. Despite their flexibility, a major pitfall that data scientists encounter is unexpected behaviour caused by the unique out-of-order execution model of notebooks. As a result, data scientists face various challenges ranging from notebook correctness, reproducibility and cleaning. In this paper, we propose a framework that performs static analysis on notebooks, incorporating their unique execution semantics. Our framework is general in the sense that it accommodate for a wide range of analyses, useful for various notebook use cases. We have instantiated our framework on a diverse set of analyses and have evaluated them on 2211 real world notebooks. Our evaluation demonstrates that the vast majority (98.7%) of notebooks can be analysed in less than a second, well within the time frame required by interactive notebook clients
