一句话:提出首个 Python 过程间最弱前置条件分析,抽取 ML 超参数约束并在 8 个库的高精度发现真实缺陷。
机器学习算子常存在跨多个超参数或数据的正确性约束,违反这些约束会触发运行时异常,但相关文档通常不完整甚至缺失。本文提出首个针对 Python 的过程间最弱前置条件分析,用于抽取机器学习超参数约束。该分析以静态分析为主,并在处理机器学习库中典型 Python 惯用法时选择性地切换到具体域,以保证分析的可处理性。作者在来自 8 个机器学习库的 181 个算子上抽取超参数约束,实验取得高精度与高召回率,并发现了真实 bug。该工作推进了 Python 静态分析,也朝着更安全、更鲁棒的机器学习迈出一步。
Machine-learning operators often have correctness constraints that cut across multiple hyperparameters and/or data. Violating these constraints causes the operator to raise runtime exceptions, but those are usually documented only informally or not at all. This paper presents the first interprocedural weakest-precondition analysis for Python to extract hyperparameter constraints. The analysis is mostly static, but to make it tractable for typical Python idioms in machine-learning libraries, it selectively switches to the concrete domain for some cases. This paper demonstrates the analysis by extracting hyperparameter constraints for 181 operators from a total of 8 ML libraries, where it achieved high precision and recall and found real bugs. Our technique advances static analysis for Python and is a step towards safer and more robust machine learning.
@inproceedings{paperbot7385,
title = {The raise of machine learning hyperparameter constraints in Python code},
author = {Ingkarat Rak-amnouykit and Ana Milanova and Guillaume Baudart and Martin Hirzel and Julian Dolby},
booktitle = {ISSTA},
year = {2022},
doi = {10.1145/3533767.3534400}
}