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 Kaggle notebooks with human-labeled ground truth, preprocessing leakage detection reaches 65% precision at 100% recall; on 38 published scientific papers applying AI/ML, precision is 62% (LLM-judged) with substantial variation across pattern categories; on a held-out paper set, precision is 54%. On controlled tests, scicode-lint achieves 97.7% accuracy across 66 patterns.


翻译:科学Python代码中的方法论错误会产生看似合理但实际错误的结果,传统linter和静态分析工具无法检测此类错误。多个研究团队已构建了专门针对机器学习的linter,证明此类检测具有可行性。但这些工具普遍存在可持续性问题:依赖特定pylint或Python版本、封装性有限、且每个新模式均需人工编码实现。随着AI生成代码导致科学软件规模激增,对自动化方法论检查(如检测数据泄露、错误交叉验证、缺失随机种子等)的需求日益增长。我们提出scicode-lint,其双层架构将模式设计(构建时采用前沿模型)与执行(运行时使用轻量本地模型)相分离。模式由系统自动生成而非人工编码;适配新库版本仅需消耗计算资源而非工程人力。在带人工标注的Kaggle笔记本测试中,预处理泄露检测在100%召回率下达到65%精确率;在38篇应用AI/ML的已发表科学论文中,精确率为62%(基于大语言模型评估),不同模式类别间差异显著;在留出论文集中精确率为54%。在受控测试中,scicode-lint在66个模式上实现了97.7%的准确率。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
【新书】异常检测 Python,562页pdf
专知会员服务
44+阅读 · 2024年12月27日
专知会员服务
94+阅读 · 2020年12月26日
【干货书】Python数据科学分析,413页pdf
专知会员服务
93+阅读 · 2020年8月22日
一个牛逼的 Python 调试工具
机器学习算法与Python学习
15+阅读 · 2019年4月30日
最全数据科学学习资源:Python、线性代数、机器学习...
人工智能头条
12+阅读 · 2018年5月14日
动手写机器学习算法:异常检测 Anomaly Detection
七月在线实验室
11+阅读 · 2017年12月8日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
7+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
8+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
6+阅读 · 6月17日
相关VIP内容
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员