我们是否迷失在森林中?通过数据驱动的静态分析检测随机森林分类器的静默语义故障
Are We Lost in the Woods? Detecting Silent Semantic Faults for Random Forest Classifiers with Data-informed Static Analysis
AI总结:
提出一种数据驱动的静态分析技术,通过提取ML流水线为有向无环图并对照形式化API契约评估,以检测随机森林分类器中的静默语义故障,实现高精度(91%)和亚秒级运行时开销。
摘要:
尽管机器学习(ML)软件需要有效的质量保证,但ML工程师仍然会遇到静默语义故障,例如不平衡数据集,这些故障会降低预测性能而没有明显症状。这些故障通常是在昂贵的训练周期之后才被检测到,导致严重的资源浪费。我们提出了一种数据驱动的静态分析技术,用于检测使用流行随机森林分类器的ML脚本中的静默语义故障。我们的方法将ML流水线提取为有向无环图,并对照形式化的API契约进行评估,以检测结构、数据和超参数故障。我们的分析使用聚合的数据属性,即使由于保密限制而无法访问数据集,也能实现故障检测。我们在开源工具dille中实现了该技术,并在使用随机森林分类器的真实世界Kaggle笔记本上进行了评估。结果表明,该工具能够以91%的精度和亚秒级运行时开销识别相关的语义故障,使其适合集成到集成开发环境、代理工作流和持续集成流水线中。我们的实证研究表明,12%至18%的现有使用随机森林分类器的ML笔记本受到静默语义故障的影响,突显了数据驱动静态分析在减轻ML调试负担方面的直接实用价值。
英文摘要:
While machine learning (ML) software necessitates effective quality assurance, ML engineers still encounter silent semantic faults, such as imbalanced datasets, that degrade prediction performance without apparent symptoms. These faults are typically detected after expensive training cycles, causing significant resource waste. We propose a data-informed static analysis technique to detect silent semantic faults in ML scripts that use the popular random forest classifier. Our approach extracts ML pipelines into directed acyclic graphs and evaluates them against formalized API contracts to detect structural, data, and hyperparameter faults. Our analysis uses aggregated data properties, enabling fault detection even when datasets are inaccessible due to confidentiality restrictions. We implemented this technique in an open-source tool, dille, and evaluated it on real-world Kaggle notebooks that use the random forest classifier. Our results demonstrate that the tool identifies relevant semantic faults with 91% precision and sub-second runtime overhead, making it suitable for integration into integrated development environments, agentic workflows, and continuous integration pipelines. Our empirical study reveals that 12% to 18% of existing ML notebooks that use the random forest classifier are affected by silent semantic faults, highlighting the immediate practical utility of data-informed static analysis in reducing the burden of ML debugging.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。