Principled and practical static analysis for Python: Weakest precondition inference of hyperparameter constraints - Archive ouverte HAL Accéder directement au contenu
Article Dans Une Revue Software: Practice and Experience Année : 2024

Principled and practical static analysis for Python: Weakest precondition inference of hyperparameter constraints

Ana Milanova
Guillaume Baudart
Martin Hirzel
Julian Dolby

Résumé

Application programming interfaces often have correctness constraints that cut across multiple arguments. Violating these constraints causes the underlying code to raise runtime exceptions, but at the interface level, these are usually documented at most informally. This article presents novel principled static analysis and the first interprocedural weakest‐precondition analysis for Python to extract inter‐argument constraints. The analysis is mostly static, but to make it tractable for typical Python idioms, it selectively switches to the concrete domain for some cases. This article focuses on the important case where the interfaces are machine‐learning operators and their arguments are hyperparameters, rife with constraints. We extracted hyperparameter constraints for 429 functions and operators from 11 libraries and found real bugs. We used a methodology to obtain ground truth for 181 operators from 8 machine‐learning libraries; the analysis achieved high precision and recall for them. Our technique advances static analysis for Python and is a step towards safer and more robust machine learning.
Fichier principal
Vignette du fichier
paper.pdf (1.81 Mo) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-04489590 , version 1 (05-03-2024)

Identifiants

Citer

Ingkarat Rak‐amnouykit, Ana Milanova, Guillaume Baudart, Martin Hirzel, Julian Dolby. Principled and practical static analysis for Python: Weakest precondition inference of hyperparameter constraints. Software: Practice and Experience, 2024, 54 (3), pp.363-393. ⟨10.1002/spe.3279⟩. ⟨hal-04489590⟩
26 Consultations
4 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More