arXiv:2609.10610v1 Announce Type: cross Abstract: Context: Computational notebooks are the standard environment for machine learning (ML) development. Within the ML community, model performance is often the primary considered metric, and code quality is treated as a secondary concern. This prioritization relies on a largely untested assumption that code quality and ML performance are unrelated. Practitioners also reuse existing code that may come from notebooks selected through social signals (popularity, author expertise) whose reliability as quality proxies has never been assessed. Objective: We empirically investigated the relationship between code quality and ML performance in notebooks, and evaluated whether popularity and author expertise give indication on code quality or performance. Method: We conducted a large-scale empirical study of 265,363 Python notebooks submitted to Kaggle competitions. We assessed code quality with two static analysis tools: Pylint, capturing general Python code quality, and SonarQube, configured with a profile of 34 rules targeting data-science and ML-specific practices. Results: The relationship between code quality and performance depends on the notion of quality considered. General Python code quality is decoupled from ML performance, showing negligible or non-significant correlations across all observations. In contrast, ML-specific violations exhibit a consistent, small negative association with performance that persists across all observations. The popularity of a notebook does not give information on the code quality or performance. Code expertise provides no information on quality or performance, but competition expertise correlates with better performance, fewer ML-specific violations, and slightly more Python errors and refactoring violations.
On the Relation between Code Quality and Machine Learning Performance: A Large-scale Empirical Study
A large-scale empirical study of 265,363 Python notebooks submitted to Kaggle competitions found that general Python code quality is decoupled from machine learning performance, showing negligible or non-significant correlations across all observations, while ML-specific violations exhibit a consistent, small negative association with performance. The study, posted to arXiv as 2609.10610v1, assessed code quality using Pylint for general Python quality and SonarQube configured with 34 data-science and ML-specific rules. Notebook popularity provided no information on code quality or performance, and competition expertise correlated with better performance, fewer ML-specific violations, and slightly more Python errors and refactoring violations.
Run your AI side-project on zahid.host
EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.