The raise of machine learning hyperparameter constraints in Python code
Ingkarat Rak-amnouykit, Ana L. Milanova, Guillaume Baudart, Martin Hirzel, Julian Dolby
Abstract
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. CCS CONCEPTS • Theory of computation → Semantics and reasoning; • Software and its engineering → Functionality.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 12c93cac-fe37-4db3-bef1-2c104bde2258Builds on5
- TypeWriter: neural type prediction with search-based validationMichael Pradel, Georgios Gousios, Jason Liu, Satish ChandraFSE 2020 · 102 citations
- Typilus: neural type hintsMiltiadis Allamanis, Earl T. Barr, Soline Ducousso, Zheng GaoPLDI 2020 · 92 citations
- Pipeline Combinators for Gradual AutoMLGuillaume Baudart, Martin Hirzel, Kiran Kate, Parikshit Ram et al.NeurIPS 2021 · 27 citations
- Finding data compatibility bugs with JSON subschema checkingAndrew Habib, Avraham Shinnar, Martin Hirzel, Michael PradelISSTA 2021 · 16 citations
- PyCG: Practical Call Graph Generation in PythonVitalis Salis, Thodoris Sotiropoulos, Panos Louridas, Diomidis Spinellis et al.ICSE 2021
Related papers
- DocTer: documentation-guided fuzzing for testing deep learning API functionsDanning Xie, Yitong Li, Mijung Kim, Hung Viet Pham et al.ISSTA 2022 · 72 citations
- ACETest: Automated Constraint Extraction for Testing Deep Learning OperatorsJingyi Shi, Yang Xiao, Yuekang Li, Yeting Li et al.ISSTA 2023 · 24 citations
- Design by Contract for Deep Learning APIsShibbir Ahmed, Sayem Mohammad Imtiaz, Syeda Khairunnesa Samantha, Breno Dantas Cruz et al.FSE 2023 · 10 citations
- DyLin: A Dynamic Linter for PythonAryaz Eghbali, Felix Burk, Michael PradelFSE 2025 · 1 citation
- Identifying Multi-parameter Constraint Errors in Python Data Science Library API DocumentationXiufeng Xu, Fuman Xie, Chenguang Zhu, Guangdong Bai et al.ISSTA 2025
