scicode-lint: Detecting Methodology Bugs in Scientific Python Code with LLM-Generated Patterns
Sergey V. Samsonau

TL;DR
scicode-lint is an innovative tool that uses large language models to automatically generate and detect methodology bugs in scientific Python code, improving sustainability and adaptability over traditional static analysis methods.
Contribution
It introduces a two-tier architecture separating pattern generation from detection, enabling automated, adaptable methodology bug detection in scientific Python code using LLMs.
Findings
Preprocessing leakage detection achieves 65% precision at 100% recall.
Precision on scientific papers is 62% with variation across categories.
Achieves 97.7% accuracy on controlled pattern tests.
Abstract
Methodology bugs in scientific Python code produce plausible but incorrect results that traditional linters and static analysis tools cannot detect. Several research groups have built ML-specific linters, demonstrating that detection is feasible. Yet these tools share a sustainability problem: dependency on specific pylint or Python versions, limited packaging, and reliance on manual engineering for every new pattern. As AI-generated code increases the volume of scientific software, the need for automated methodology checking (such as detecting data leakage, incorrect cross-validation, and missing random seeds) grows. We present scicode-lint, whose two-tier architecture separates pattern design (frontier models at build time) from execution (small local model at runtime). Patterns are generated, not hand-coded; adapting to new library versions costs tokens, not engineering hours. On…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsComputational Physics and Python Applications · Scientific Computing and Data Management · Machine Learning in Materials Science
